################################################################################
#
#       Project: Unit test
#   Description: Makefile for unit tests in `common' directory
#        Author: [kb]ypp
#    Created at: October 29, 2005
# Last modified: 
#
################################################################################

CXX = g++
CXXFLAGS = -O2 -Wall -ansi

LDFLAGS = -L/usr/local/lib64/boost
LIBS = -lboost_unit_test_framework-gcc-1_33_1

TARGETS = test_vec
# test_mat3 test_quat

.PHONY: all clean

all: $(TARGETS)

test_vec: test_vec.o ../VectorMath.o ../../engine/Log.o
	$(CXX) -o test_vec test_vec.o $(LDFLAGS) $(LIBS) \
		../VectorMath.o ../../engine/Log.o

test_mat3: test_mat3.o ../Matrix3x3.o ../Vector3.o ../../engine/Log.o
	$(CXX) -o test_mat3 test_mat3.o $(LDFLAGS) $(LIBS) \
		../Matrix3x3.o ../Vector3.o ../../engine/Log.o

test_quat: test_quat.o ../Quaternion.o ../Vector3.o ../Matrix3x3.o ../../engine/Log.o
	$(CXX) -o test_quat test_quat.o $(LDFLAGS) $(LIBS) \
		../Quaternion.o ../Vector3.o ../Matrix3x3.o ../../engine/Log.o

test_vec.o: test_vec.cpp ../VectorMath.h
	$(CXX) $(CXXFLAGS) -c test_vec.cpp

test_mat3.o: test_mat3.cpp ../Matrix3x3.h
	$(CXX) $(CXXFLAGS) -c test_mat3.cpp

test_quat.o: test_quat.cpp ../Quaternion.h
	$(CXX) $(CXXFLAGS) -c test_quat.cpp

clean:
	$(RM) -v $(TARGETS) *.o
